Skip to content

Conversation

@jonmbake
Copy link
Owner

No description provided.

Copilot AI review requested due to automatic review settings December 31, 2025 17:53
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR sets up ESLint with TypeScript support and updates the codebase to comply with linting rules, while also updating GitHub workflows to reference the renamed main branch.

Key changes:

  • Adds comprehensive ESLint configuration with TypeScript, React, and React Hooks plugins
  • Fixes linting violations throughout the codebase (unused parameters, missing dependency arrays, JSX compliance)
  • Migrates demo from React 17's ReactDOM.render to React 18's createRoot API
  • Updates GitHub workflows to use 'main' branch instead of 'master'

Reviewed changes

Copilot reviewed 9 out of 10 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
eslint.config.js New ESLint flat config with TypeScript, React, and React Hooks rules configured
package.json Adds lint script and ESLint-related dependencies; sets "type": "module"
package-lock.json Updates lockfile with new ESLint dependencies
tests/index.spec.tsx Removes unused parameter type annotations from test callbacks
src/index.tsx Adds missing dependencies to useEffect arrays for exhaustive-deps rule compliance
demo/index.tsx Migrates to React 18's createRoot API; adds JSX keys; escapes quotes for linting
rollup.config.demo.js Adds react-dom/client global mapping for React 18 compatibility
.github/workflows/main.yml Updates branch references from 'master' to 'main'; updates Actions versions
.github/workflows/pull-request.yml Adds new PR workflow with build, lint, and test steps
README.md Updates screenshot URLs to reference 'main' branch

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-advanced-security
Copy link

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

localStorage parse errors

- Add try-catch for JSON.parse when loading history from localStorage
  to prevent crashes on malformed data
- Add missing terminalHistoryKey dependency to useEffect hooks to
  ensure history loads/saves correctly when terminal name changes
- Fix WindowButtons red button using wrong callback for clickable class
- Replace DOM-based text measurement (span create/append/remove) with
  canvas.measureText() for better performance on cursor positioning
- Fix inconsistent trim behavior: now saves trimmed input to history
  instead of comparing trimmed but storing untrimmed
- Add useCallback to React imports
- Wrap updateCurrentLineInput handler in useCallback for memoization
- Extract magic numbers as named constants:
  - SCROLL_INTO_VIEW_DELAY_MS (500)
  - CURSOR_POSITION_OFFSET_PX (1)
- Move clamp utility function to module scope for reuse
@jonmbake jonmbake merged commit b8d0b28 into main Jan 1, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants